﻿@{
    Layout = null;
}

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>深圳凡曦电子商务有限公司</title>
    <link href="~/Scripts/css/test.css" rel="stylesheet" />
    <link href="~/Content/bootstrap/css/style.css" rel="stylesheet" />
    <link href="~/Content/bootstrap/css/base.css" rel="stylesheet" />
    <script src="~/Scripts/jquery-2.1.1.min.js"></script>
    <script src="~/Scripts/layer/layer.js"></script>
    <script type="text/javascript">
        $(function () {
            $(".username").focus();
            $("body").keydown(function () {
                if (event.keyCode == "13") {//keyCode=13是回车键
                    $('#submit').trigger('click');
                }
            });

        })
        //登录
        function GetLogin() {

            var userName = $(".username").val();
            var userPwd = $(".password").val();
            if (userName == '' || userPwd == '') {
                layer.msg("请输入用户名和密码！");
            } else {
                $.ajax({
                    type: "Post",
                    url: "/Login/GetLogin",
                    data: { "userName": userName, "userPwd": userPwd },
                    dataType: "json",
                    success: function (data) {
                        //alert(JSON.stringify(data));
                        if (data == "") {
                            layer.msg("用户名或密码错误！");
                            return;
                        } else if (data.IsAdmin == '0') {
                            layer.msg("请使用管理员帐号登录！");
                            return;

                        } else {
                            layer.msg("登录成功！");
                            window.location.href = "/Account/Index";
                        }
                    }
                })
            }
        }

    </script>
    <style type="text/css">
        html, body {
         height:100%;
        }
        .rightoverflow {
            height: 85%;
            overflow-y: auto;
        }

    </style>
</head>
<body style="background-color: #ECECE8; ">

    <div align="center" style="background-color: #FF8302;">

        <div style="background-color: #FF8302; float: left; width:15%; padding-left:10%; ">
            <!--  <img src="~/Content/images/logo.jpg"/>-->
            <img src="~/Content/images/top_log1.png" style="width:100%; height:48px; line-height:48px;" />
        </div>
        <div class="nav" style="margin-left:30%;">
            <ul id="ul_top" style="">
                <li><a href="/Account/Index" style="color:white;">登录</a></li>
            </ul>
            <div class="curBg"></div>
            <div class="cls"></div>
        </div>

    </div>

    <div class="nav" style="margin-left: 10%; margin-right: 10%; background-color:white;margin-top:20px;height:81%;">
        <div class="rightoverflow">
            <div class="ove-hid">
                <div class="wid-100 cor-4d4 fon-siz20 lin-hei60 bor-bot999">
                    <div class="flo-lef">&nbsp;&nbsp;&nbsp;&nbsp;<span><i class="fa fa-gear"></i></span><span>管理登录</span></div>
                </div>
            </div>
            <div class="ove-hid">
                <div class="wid-120 cor-4d4 fon-siz20 lin-hei60 bor-botdcd ">
                </div>
            </div>
            <div class="ove-hid">
                <div class="Rep-main wid-120 mag-top50" style="margin-left:200px;">
                    <p style="margin-top:30px;">账号：<input type="text" name="username" class="username" placeholder="输入你的帐号" autocomplete="off" style="height: 30px; width:30%;" /></p>
                    <p style="margin-top:30px;">密码：<input type="password" name="password" class="password" placeholder="输入你的密码" oncontextmenu="return false" onpaste="return false" style="height: 30px; width:30%;" /></p>
                    <p style="margin-top:30px; margin-left:70px;"><input type="button" value="登录" id="submit" onclick="GetLogin()" style="background-color: #FF8302; border:0; width:10%; height:30px;" /></p>
                </div>
            </div>
        </div>
    </div>

    <div style="width: 100%; margin-top: 15px;line-height:45px; height: 45px; bottom: 10px; position: absolute; text-align: center;  ">
        <p>©版权所有 2016 上海诺标</p>
    </div>
</body>
</html>
